//
//  HJInviteJourneyLeftCell.m
//  project
//
//  Created by jc on 2019/5/14.
//  Copyright © 2019 健健. All rights reserved.
//

#import "HJInviteJourneyLeftCell.h"
#import "HJChatTextMsgModel.h"
#import "HJSimpleMessage.h"
#import "YFJourneyModel.h"

@interface HJInviteJourneyLeftCell ()
@property (weak, nonatomic) IBOutlet UIView *avatorImageView;
@property (weak, nonatomic) IBOutlet UIView *bgView;
@property (weak, nonatomic) IBOutlet UILabel *name;
@property (weak, nonatomic) IBOutlet UILabel *creatTime;
@property (weak, nonatomic) IBOutlet UILabel *location;
@property (weak, nonatomic) IBOutlet UIImageView *headImage;
//@property (weak, nonatomic) IBOutlet UIButton *sendError;

@property (weak, nonatomic) IBOutlet UIButton *leftInviteBtn;
@end

@implementation HJInviteJourneyLeftCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    [self.contentView setupShadowWithView:self.bgView];
    [self.headImage rounded:UIRectCornerAllCorners radius:20 borderColor:[UIColor blackColor] borderWidth:1];
    @weakify(self)
    [[self.leftInviteBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
        @strongify(self)
        self.leftCellClickedBlock();
    }];
}

-(void)loadLeftData:(HJSimpleModel *)model {
    [self.headImage sd_setImageWithURL:model.data.user.avatarURL placeholderImage:setImage(@"img_mydongtai_defualt_avatar")];
    self.name.text = model.data.user.nickName;
    self.creatTime.text = model.data.team.startTime;
    self.location.text = model.data.team.startText;
}


@end
